閱讀掃描文件
此程式碼範例示範如何使用 OCR(光學字元辨識)引擎從圖像中提取文字。
準備好開始了嗎?
Nuget 下載 5,585,834 | 版本: 2026.4 剛剛發布
using IronOcr;
using System;
// Instantiate OCR engine
var ocr = new IronTesseract();
// Configure OCR engine
using var input = new OcrInput();
input.LoadImage("potter.tiff");
// Perform OCR
OcrResult result = ocr.ReadDocument(input);
Console.WriteLine(result.Text);
Imports IronOcr
Imports System
' Instantiate OCR engine
Private ocr = New IronTesseract()
' Configure OCR engine
Private input = New OcrInput()
input.LoadImage("potter.tiff")
' Perform OCR
Dim result As OcrResult = ocr.ReadDocument(input)
Console.WriteLine(result.Text)
Install-Package IronOcr
此程式碼範例示範如何使用 OCR(光學字元辨識)引擎從圖像中提取文字。